﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BusinessLogic
{
    public class BizPlace
    {
        #region properties
        public int id { get; set; }
        public string title { get; set; }
        public string website { get; set; }
        public double latitude { get; set; }
        public double longitude { get; set; }
        public string address { get; set; }
        public string contactPhone { get; set; }
        public string icon { get; set; }
        public string image { get; set; }
        #endregion

        #region constructors
        public BizPlace(){}
        public BizPlace(int id, double latitude, double longitude, string icon)
        {
            this.id = id;
            this.latitude = latitude;
            this.longitude = longitude;
            this.icon = icon;
        }
        public BizPlace(int id, string title, double latitude, double longitude, string website, string address, string contactPhone, string icon, string image)
        {
            this.id = id;
            this.title = title;
            this.latitude = latitude;
            this.longitude = longitude;
            this.website = website;
            this.address = address;
            this.contactPhone = contactPhone;
            this.icon = icon;
            this.image = image;

        }
        #endregion

        #region method
        public static List<BizPlace> getAll()
        {
            return DataAccess.DalPlace.getAll();
        }
        public static List<BizPlace> getSimplyPlaces()
        {
            return DataAccess.DalPlace.getSimplyPlaces();
        }
        public static BizPlace getPlacebyId(int id)
        {
            return DataAccess.DalPlace.getPlacebyId(id);
        }
        public static List<BizPlace> searchPlace(string address, int cityId)
        {
            return DataAccess.DalPlace.searchPlace(address, cityId);
        }
        #endregion
    }
}